using System;
using System.Collections.Generic;
using System.Text;

namespace Dominio
{
    public class Answer
    {
        private int id;
        private User author;
        private String subject;
        private String description;
        private Question question;
        private DateTime creation;

        //Empty constructor used by hibernate
        public Answer()
        {}

        public Answer(String subject, String answer, User author, Question question)
        {
            this.Subject = subject;
            this.Description = answer;
            this.Author = author;
            this.creation = DateTime.Now;
            this.Question = question;
        }

        #region getters and Setters
        public virtual int Id
        {
            get { return id; }
            set { id = value; }
        }

        public virtual String Subject
        {
            get { return subject; }
            set { subject = value; }
        }
        public virtual User Author
        {
            get { return author; }
            set { author = value; }
        }

        public virtual String Description
        {
            get { return description; }
            set { description = value; }
        }

        public virtual Question Question
        {
            get { return question; }
            set { question = value; }
        }

        public virtual DateTime Creation
        {
            get { return creation; }
            set { creation = value; }
        } 
        #endregion

    }
}
